package com.example.demo.dto;

import com.example.demo.dto.IErrorCode;
import com.example.demo.dto.ResultCode;

public enum ResultCode implements IErrorCode {
    SUCCESS(200L, ""),
            FAILED(500L, ""),
                    VALIDATE_FAILED(404L, ""),
                            UNAUTHORIZED(401L, ""),
                                    FORBIDDEN(403L, ""),
                                            DATA_DOES_NOT_EXIST(501L, "");

    private long code;

    private String message;

    ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public long getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }
    }
